<template>
  <div>
    <h1>订单列表</h1>

    <el-button type="primary" :loading="status" @click="send">Loading</el-button>
  </div>
</template>

<script setup>
import { getuserinfo } from '../../api/userinfo'
import { useLoading } from '../../hook/useLoading'

const [status, fn] = await useLoading(getuserinfo)
async function send() {
  let result = await fn()
  console.log(result)
}
</script>

<style lang="scss" scoped></style>
